<?php
/**
 * Created by PhpStorm.
 * User: chen
 * Date: 18-6-9
 * Time: 上午10:34
 */

namespace App\ServiceHandler\Common;


use App\Model\Common\Position;

class PositionService
{
    public static function post($params){
        if(isset($params['id']) && !empty($params['id'])){
            $model = Position::find($params['id']);
        }else{
            $model = Position();
        }
        $model->name = $params['name'];
        $model->authories = $params['authories'];
        if($model->save()){
            return true;
        }
        return false;
    }
}